package com.winsdom.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.winsdom.domain.vo.FinishedTaskVO;
import com.winsdom.domain.vo.UnfinishedTaskVO;
import com.winsdom.entity.ReadingTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 抄表任务表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2025-05-12
 */
@Mapper
public interface ReadingTaskMapper extends BaseMapper<ReadingTask> {

    Page<UnfinishedTaskVO> getUnfinishedTask(Page<UnfinishedTaskVO> taskVOPage,@Param("buildingIds")List<Long> buildingId);

    Page<FinishedTaskVO> getFinishedTask(Page<FinishedTaskVO> taskVOPage,@Param("buildingIds")List<Long> buildingId);

    //获取所有有任务的楼盘
    @Select("SELECT DISTINCT category_id FROM reading_task")
    List<Long> getAllCategoryIdList();
}
